Skip to main content
POST
/
auth
/
register
Register a new user
curl --request POST \
  --url https://your_a2_service/auth/register \
  --header 'Content-Type: application/json' \
  --data '{
  "budget": 1,
  "credit": 1,
  "email": "jsmith@example.com",
  "is_active": true,
  "is_superuser": true,
  "is_verified": true,
  "name": "<string>",
  "password": "<string>",
  "permissions": {},
  "preferences": {
    "etc": {
      "language": "ko"
    },
    "notification_methods": {
      "email": true,
      "slack": false,
      "sms": false
    },
    "notification_methods_data": {
      "slack": "<SLACK_WEBHOOK_URL>",
      "sms": ""
    },
    "notifications": {
      "attribute_deleted": true,
      "campaign_finished": true,
      "publish_approval": true,
      "publish_request": true
    }
  },
  "role": "<string>"
}'
{
"budget": 123,
"campaign_count": 1,
"creative_count": 1,
"credit": 123,
"email": "jsmith@example.com",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"is_superuser": true,
"is_verified": true,
"name": "<string>",
"permissions": {},
"placement_count": 1,
"preferences": {
"etc": {
"language": "ko"
},
"notification_methods": {
"email": true,
"slack": false,
"sms": false
},
"notification_methods_data": {
"slack": "<SLACK_WEBHOOK_URL>",
"sms": ""
},
"notifications": {
"attribute_deleted": true,
"campaign_finished": true,
"publish_approval": true,
"publish_request": true
}
},
"role": "advertiser"
}

Body

application/json

Represents a create command for a user.

email
string<email>
required
name
string
required
password
string
required
permissions
object
required
role
string
required
budget
number | null
default:0
Required range: x >= 0
credit
number | null
default:0
Required range: x >= 0
is_active
boolean | null
default:true
is_superuser
boolean | null
default:false
is_verified
boolean | null
default:false
preferences
object | null

Represents a user preferences.

Response

Successful Response

Represents a read command for a user.

budget
number
required

The total budget currently available to the user.

campaign_count
integer
required

The number of campaigns owned by the user.

Required range: x >= 0
creative_count
integer
required

The number of creatives owned by the user.

Required range: x >= 0
credit
number
required

The total credit currently available to the user.

email
string<email>
required

The email of the user.

id
string<uuid>
required

The id of the user.

is_active
boolean
required

Is the user active.

is_superuser
boolean
required

Is the user admin.

is_verified
boolean
required

Is the user email is verified.

permissions
object
required

The permissions information of the user.

Examples:
{}
{
"admin": [],
"advertiser": ["permission"],
"analytic": ["campaign"],
"audience": [],
"audience_attribute": ["r"],
"audience_segment": ["r", "w"],
"campaign": ["r", "w"],
"creative": ["r", "w"],
"placement": ["r"],
"retailer": []
}
{
"admin": ["list_advertisers", "budget"],
"advertiser": [],
"analytic": ["placement"],
"audience": ["r"],
"audience_attribute": ["r", "w"],
"audience_segment": ["r", "w"],
"campaign": ["r"],
"creative": ["r", "w"],
"placement": ["r", "w"],
"retailer": ["approval", "permission"]
}
placement_count
integer
required

The number of placements owned by the user.

Required range: x >= 0
preferences
object | null
required

Represents a user preferences.

role
enum<string>
required

User role enum.

Available options:
advertiser,
retailer,
admin
name
string | null

The name of the user.